cmake_minimum_required (VERSION 3.14)
project (OTAfeature VERSION 1.0)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_COMPILER clang++)
set(CMAKE_C_COMPILER clang)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}  -std=c++17")
set(CMAKE_BUILD_TYPE Debug)
# set(CMAKE_BUILD_TYPE Release)

set(PROJECT_SOUTCRS
    S2/s2diff.c
    S2/stack.c
    S2/tpcOpera.c
    S2/cmd.c
)

add_executable(s2diff
    ${PROJECT_SOUTCRS}
)
target_compile_options(s2diff PRIVATE -Wall)
target_link_libraries(s2diff PRIVATE lzma)

add_executable(s2patch 
    S2/s2patch.c
)
target_compile_options(s2patch PRIVATE -Wall)
target_link_libraries (s2patch PRIVATE lzma)
